package com.niiwoo.activity.event.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description 流标原因（用户流标，大数据流标，审核模型流标，投资未满流标）
 * @Author zq
 * @Date 2018/3/23
 */
@Getter
@AllArgsConstructor
public enum FlowProjectTypeEventEnum {

    USER_FLOW(Byte.valueOf("1"), "用户流标"),
    BIGDATA_FLOW(Byte.valueOf("2"), "大数据流标"),
    AUDIT_MODEL_FLOW(Byte.valueOf("3"), "审核模型流标"),
    INVEST_UNDER_FLOW(Byte.valueOf("4"), "投资未满流标");

    private Byte type;

    private String desc;

    public static FlowProjectTypeEventEnum valueOf(Byte code) {
        for (FlowProjectTypeEventEnum typeEventEnum : FlowProjectTypeEventEnum.values()) {
            if (code.byteValue() == typeEventEnum.getType()) {
                return typeEventEnum;
            }
        }
        return null;
    }

}
